var M = navigator.userAgent.toLowerCase();
var TestIE = {
	IE : /msie/.test(M),
	OPERA : /opera/.test(M),
	MOZ : /gecko/.test(M),
	IE5 : /msie 5 /.test(M),
	IE55 : /msie 5.5/.test(M),
	IE6 : /msie 6/.test(M),
	IE7 : /msie 7/.test(M),
	SAFARI : /safari/.test(M)
};
if (TestIE.IE6) {
	try {
		document.execCommand("BackgroundImageCache", false, true)
	} catch (e) {
	}
}
var swfobject = function() {
	var aq = "undefined", aD = "object", ab = "Shockwave Flash", X = "ShockwaveFlash.ShockwaveFlash", aE = "application/x-shockwave-flash", ac = "SWFObjectExprInst", ax = "onreadystatechange", af = window, aL = document, aB = navigator, aa = false, Z = [ aN ], aG = [], ag = [], al = [], aJ, ad, ap, at, ak = false, aU = false, aH, an, aI = true, ah = function() {
		var a = typeof aL.getElementById != aq
				&& typeof aL.getElementsByTagName != aq
				&& typeof aL.createElement != aq, f = aB.userAgent
				.toLowerCase(), c = aB.platform.toLowerCase(), k = c ? /win/
				.test(c) : /win/.test(f), m = c ? /mac/.test(c) : /mac/.test(f), h = /webkit/
				.test(f) ? parseFloat(f.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,
				"$1")) : false, d = !+"\v1", g = [ 0, 0, 0 ], n = null;
		if (typeof aB.plugins != aq && typeof aB.plugins[ab] == aD) {
			n = aB.plugins[ab].description;
			if (n
					&& !(typeof aB.mimeTypes != aq && aB.mimeTypes[aE] && !aB.mimeTypes[aE].enabledPlugin)) {
				aa = true;
				d = false;
				n = n.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
				g[0] = parseInt(n.replace(/^(.*)\..*$/, "$1"), 10);
				g[1] = parseInt(n.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
				g[2] = /[a-zA-Z]/.test(n) ? parseInt(n.replace(
						/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0
			}
		} else {
			if (typeof af.ActiveXObject != aq) {
				try {
					var l = new ActiveXObject(X);
					if (l) {
						n = l.GetVariable("$version");
						if (n) {
							d = true;
							n = n.split(" ")[1].split(",");
							g = [ parseInt(n[0], 10), parseInt(n[1], 10),
									parseInt(n[2], 10) ]
						}
					}
				} catch (b) {
				}
			}
		}
		return {
			w3 : a,
			pv : g,
			wk : h,
			ie : d,
			win : k,
			mac : m
		}
	}(), aK = function() {
		if (!ah.w3) {
			return
		}
		if ((typeof aL.readyState != aq && aL.readyState == "complete")
				|| (typeof aL.readyState == aq && (aL
						.getElementsByTagName("body")[0] || aL.body))) {
			aP()
		}
		if (!ak) {
			if (typeof aL.addEventListener != aq) {
				aL.addEventListener("DOMContentLoaded", aP, false)
			}
			if (ah.ie && ah.win) {
				aL.attachEvent(ax, function() {
					if (aL.readyState == "complete") {
						aL.detachEvent(ax, arguments.callee);
						aP()
					}
				});
				if (af == top) {
					(function() {
						if (ak) {
							return
						}
						try {
							aL.documentElement.doScroll("left")
						} catch (a) {
							setTimeout(arguments.callee, 0);
							return
						}
						aP()
					})()
				}
			}
			if (ah.wk) {
				(function() {
					if (ak) {
						return
					}
					if (!/loaded|complete/.test(aL.readyState)) {
						setTimeout(arguments.callee, 0);
						return
					}
					aP()
				})()
			}
			aC(aP)
		}
	}();
	function aP() {
		if (ak) {
			return
		}
		try {
			var b = aL.getElementsByTagName("body")[0].appendChild(ar("span"));
			b.parentNode.removeChild(b)
		} catch (a) {
			return
		}
		ak = true;
		var d = Z.length;
		for ( var c = 0; c < d; c++) {
			Z[c]()
		}
	}
	function aj(a) {
		if (ak) {
			a()
		} else {
			Z[Z.length] = a
		}
	}
	function aC(a) {
		if (typeof af.addEventListener != aq) {
			af.addEventListener("load", a, false)
		} else {
			if (typeof aL.addEventListener != aq) {
				aL.addEventListener("load", a, false)
			} else {
				if (typeof af.attachEvent != aq) {
					aM(af, "onload", a)
				} else {
					if (typeof af.onload == "function") {
						var b = af.onload;
						af.onload = function() {
							b();
							a()
						}
					} else {
						af.onload = a
					}
				}
			}
		}
	}
	function aN() {
		if (aa) {
			Y()
		} else {
			am()
		}
	}
	function Y() {
		var d = aL.getElementsByTagName("body")[0];
		var b = ar(aD);
		b.setAttribute("type", aE);
		var a = d.appendChild(b);
		if (a) {
			var c = 0;
			(function() {
				if (typeof a.GetVariable != aq) {
					var f = a.GetVariable("$version");
					if (f) {
						f = f.split(" ")[1].split(",");
						ah.pv = [ parseInt(f[0], 10), parseInt(f[1], 10),
								parseInt(f[2], 10) ]
					}
				} else {
					if (c < 10) {
						c++;
						setTimeout(arguments.callee, 10);
						return
					}
				}
				d.removeChild(b);
				a = null;
				am()
			})()
		} else {
			am()
		}
	}
	function am() {
		var h = aG.length;
		if (h > 0) {
			for ( var k = 0; k < h; k++) {
				var c = aG[k].id;
				var o = aG[k].callbackFn;
				var a = {
					success : false,
					id : c
				};
				if (ah.pv[0] > 0) {
					var l = aS(c);
					if (l) {
						if (ao(aG[k].swfVersion) && !(ah.wk && ah.wk < 312)) {
							ay(c, true);
							if (o) {
								a.success = true;
								a.ref = av(c);
								o(a)
							}
						} else {
							if (aG[k].expressInstall && au()) {
								var f = {};
								f.data = aG[k].expressInstall;
								f.width = l.getAttribute("width") || "0";
								f.height = l.getAttribute("height") || "0";
								if (l.getAttribute("class")) {
									f.styleclass = l.getAttribute("class")
								}
								if (l.getAttribute("align")) {
									f.align = l.getAttribute("align")
								}
								var g = {};
								var d = l.getElementsByTagName("param");
								var n = d.length;
								for ( var m = 0; m < n; m++) {
									if (d[m].getAttribute("name").toLowerCase() != "movie") {
										g[d[m].getAttribute("name")] = d[m]
												.getAttribute("value")
									}
								}
								ae(f, g, c, o)
							} else {
								aF(l);
								if (o) {
									o(a)
								}
							}
						}
					}
				} else {
					ay(c, true);
					if (o) {
						var b = av(c);
						if (b && typeof b.SetVariable != aq) {
							a.success = true;
							a.ref = b
						}
						o(a)
					}
				}
			}
		}
	}
	function av(b) {
		var d = null;
		var c = aS(b);
		if (c && c.nodeName == "OBJECT") {
			if (typeof c.SetVariable != aq) {
				d = c
			} else {
				var a = c.getElementsByTagName(aD)[0];
				if (a) {
					d = a
				}
			}
		}
		return d
	}
	function au() {
		return !aU && ao("6.0.65") && (ah.win || ah.mac)
				&& !(ah.wk && ah.wk < 312)
	}
	function ae(g, d, k, f) {
		aU = true;
		ap = f || null;
		at = {
			success : false,
			id : k
		};
		var a = aS(k);
		if (a) {
			if (a.nodeName == "OBJECT") {
				aJ = aO(a);
				ad = null
			} else {
				aJ = a;
				ad = k
			}
			g.id = ac;
			if (typeof g.width == aq
					|| (!/%$/.test(g.width) && parseInt(g.width, 10) < 310)) {
				g.width = "310"
			}
			if (typeof g.height == aq
					|| (!/%$/.test(g.height) && parseInt(g.height, 10) < 137)) {
				g.height = "137"
			}
			aL.title = aL.title.slice(0, 47) + " - Flash Player Installation";
			var b = ah.ie && ah.win ? "ActiveX" : "PlugIn", c = "MMredirectURL="
					+ af.location.toString().replace(/&/g, "%26")
					+ "&MMplayerType=" + b + "&MMdoctitle=" + aL.title;
			if (typeof d.flashvars != aq) {
				d.flashvars += "&" + c
			} else {
				d.flashvars = c
			}
			if (ah.ie && ah.win && a.readyState != 4) {
				var h = ar("div");
				k += "SWFObjectNew";
				h.setAttribute("id", k);
				a.parentNode.insertBefore(h, a);
				a.style.display = "none";
				(function() {
					if (a.readyState == 4) {
						a.parentNode.removeChild(a)
					} else {
						setTimeout(arguments.callee, 10)
					}
				})()
			}
			aA(g, d, k)
		}
	}
	function aF(a) {
		if (ah.ie && ah.win && a.readyState != 4) {
			var b = ar("div");
			a.parentNode.insertBefore(b, a);
			b.parentNode.replaceChild(aO(a), b);
			a.style.display = "none";
			(function() {
				if (a.readyState == 4) {
					a.parentNode.removeChild(a)
				} else {
					setTimeout(arguments.callee, 10)
				}
			})()
		} else {
			a.parentNode.replaceChild(aO(a), a)
		}
	}
	function aO(b) {
		var d = ar("div");
		if (ah.win && ah.ie) {
			d.innerHTML = b.innerHTML
		} else {
			var f = b.getElementsByTagName(aD)[0];
			if (f) {
				var a = f.childNodes;
				if (a) {
					var g = a.length;
					for ( var c = 0; c < g; c++) {
						if (!(a[c].nodeType == 1 && a[c].nodeName == "PARAM")
								&& !(a[c].nodeType == 8)) {
							d.appendChild(a[c].cloneNode(true))
						}
					}
				}
			}
		}
		return d
	}
	function aA(f, h, c) {
		var d, a = aS(c);
		if (ah.wk && ah.wk < 312) {
			return d
		}
		if (a) {
			if (typeof f.id == aq) {
				f.id = c
			}
			if (ah.ie && ah.win) {
				var g = "";
				for ( var l in f) {
					if (f[l] != Object.prototype[l]) {
						if (l.toLowerCase() == "data") {
							h.movie = f[l]
						} else {
							if (l.toLowerCase() == "styleclass") {
								g += ' class="' + f[l] + '"'
							} else {
								if (l.toLowerCase() != "classid") {
									g += " " + l + '="' + f[l] + '"'
								}
							}
						}
					}
				}
				var k = "";
				for ( var m in h) {
					if (h[m] != Object.prototype[m]) {
						k += '<param name="' + m + '" value="' + h[m] + '" />'
					}
				}
				a.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'
						+ g + ">" + k + "</object>";
				ag[ag.length] = f.id;
				d = aS(f.id)
			} else {
				var b = ar(aD);
				b.setAttribute("type", aE);
				for ( var n in f) {
					if (f[n] != Object.prototype[n]) {
						if (n.toLowerCase() == "styleclass") {
							b.setAttribute("class", f[n])
						} else {
							if (n.toLowerCase() != "classid") {
								b.setAttribute(n, f[n])
							}
						}
					}
				}
				for ( var o in h) {
					if (h[o] != Object.prototype[o]
							&& o.toLowerCase() != "movie") {
						aQ(b, o, h[o])
					}
				}
				a.parentNode.replaceChild(b, a);
				d = b
			}
		}
		return d
	}
	function aQ(b, d, c) {
		var a = ar("param");
		a.setAttribute("name", d);
		a.setAttribute("value", c);
		b.appendChild(a)
	}
	function aw(a) {
		var b = aS(a);
		if (b && b.nodeName == "OBJECT") {
			if (ah.ie && ah.win) {
				b.style.display = "none";
				(function() {
					if (b.readyState == 4) {
						aT(a)
					} else {
						setTimeout(arguments.callee, 10)
					}
				})()
			} else {
				b.parentNode.removeChild(b)
			}
		}
	}
	function aT(a) {
		var b = aS(a);
		if (b) {
			for ( var c in b) {
				if (typeof b[c] == "function") {
					b[c] = null
				}
			}
			b.parentNode.removeChild(b)
		}
	}
	function aS(a) {
		var c = null;
		try {
			c = aL.getElementById(a)
		} catch (b) {
		}
		return c
	}
	function ar(a) {
		return aL.createElement(a)
	}
	function aM(a, c, b) {
		a.attachEvent(c, b);
		al[al.length] = [ a, c, b ]
	}
	function ao(a) {
		var b = ah.pv, c = a.split(".");
		c[0] = parseInt(c[0], 10);
		c[1] = parseInt(c[1], 10) || 0;
		c[2] = parseInt(c[2], 10) || 0;
		return (b[0] > c[0] || (b[0] == c[0] && b[1] > c[1]) || (b[0] == c[0]
				&& b[1] == c[1] && b[2] >= c[2])) ? true : false
	}
	function az(b, g, a, c) {
		if (ah.ie && ah.mac) {
			return
		}
		var f = aL.getElementsByTagName("head")[0];
		if (!f) {
			return
		}
		var h = (a && typeof a == "string") ? a : "screen";
		if (c) {
			aH = null;
			an = null
		}
		if (!aH || an != h) {
			var d = ar("style");
			d.setAttribute("type", "text/css");
			d.setAttribute("media", h);
			aH = f.appendChild(d);
			if (ah.ie && ah.win && typeof aL.styleSheets != aq
					&& aL.styleSheets.length > 0) {
				aH = aL.styleSheets[aL.styleSheets.length - 1]
			}
			an = h
		}
		if (ah.ie && ah.win) {
			if (aH && typeof aH.addRule == aD) {
				aH.addRule(b, g)
			}
		} else {
			if (aH && typeof aL.createTextNode != aq) {
				aH.appendChild(aL.createTextNode(b + " {" + g + "}"))
			}
		}
	}
	function ay(a, c) {
		if (!aI) {
			return
		}
		var b = c ? "visible" : "hidden";
		if (ak && aS(a)) {
			aS(a).style.visibility = b
		} else {
			az("#" + a, "visibility:" + b)
		}
	}
	function ai(b) {
		var a = /[\\\"<>\.;]/;
		var c = a.exec(b) != null;
		return c && typeof encodeURIComponent != aq ? encodeURIComponent(b) : b
	}
	var aR = function() {
		if (ah.ie && ah.win) {
			window.attachEvent("onunload", function() {
				var a = al.length;
				for ( var b = 0; b < a; b++) {
					al[b][0].detachEvent(al[b][1], al[b][2])
				}
				var d = ag.length;
				for ( var c = 0; c < d; c++) {
					aw(ag[c])
				}
				for ( var f in ah) {
					ah[f] = null
				}
				ah = null;
				for ( var g in swfobject) {
					swfobject[g] = null
				}
				swfobject = null
			})
		}
	}();
	return {
		registerObject : function(a, f, c, b) {
			if (ah.w3 && a && f) {
				var d = {};
				d.id = a;
				d.swfVersion = f;
				d.expressInstall = c;
				d.callbackFn = b;
				aG[aG.length] = d;
				ay(a, false)
			} else {
				if (b) {
					b({
						success : false,
						id : a
					})
				}
			}
		},
		getObjectById : function(a) {
			if (ah.w3) {
				return av(a)
			}
		},
		swfobject.embedSWF(r, "movie_player", "100%", "100%", "7", "/expressInstall.swf", n, s);
		embedSWF : function(n, f, k, g, c, a, b, l, h, m) {
			var d = {
				success : false,
				id : f
			};
			if (ah.w3 && !(ah.wk && ah.wk < 312) && n && f && k && g && c) {
				ay(f, false);
				aj(function() {
					k += "";
					g += "";
					var t = {};
					if (h && typeof h === aD) {
						for ( var r in h) {
							t[r] = h[r]
						}
					}
					t.data = n;
					t.width = k;
					t.height = g;
					var q = {};
					if (l && typeof l === aD) {
						for ( var s in l) {
							q[s] = l[s]
						}
					}
					if (b && typeof b === aD) {
						for ( var o in b) {
							if (typeof q.flashvars != aq) {
								q.flashvars += "&" + o + "=" + b[o]
							} else {
								q.flashvars = o + "=" + b[o]
							}
						}
					}
					if (ao(c)) {
						var p = aA(t, q, f);
						if (t.id == f) {
							ay(f, true)
						}
						d.success = true;
						d.ref = p
					} else {
						if (a && au()) {
							t.data = a;
							ae(t, q, f, m);
							return
						} else {
							ay(f, true)
						}
					}
					if (m) {
						m(d)
					}
				})
			} else {
				if (m) {
					m(d)
				}
			}
		},
		switchOffAutoHideShow : function() {
			aI = false
		},
		ua : ah,
		getFlashPlayerVersion : function() {
			return {
				major : ah.pv[0],
				minor : ah.pv[1],
				release : ah.pv[2]
			}
		},
		hasFlashPlayerVersion : ao,
		createSWF : function(a, b, c) {
			if (ah.w3) {
				return aA(a, b, c)
			} else {
				return undefined
			}
		},
		showExpressInstall : function(b, a, d, c) {
			if (ah.w3 && au()) {
				ae(b, a, d, c)
			}
		},
		removeSWF : function(a) {
			if (ah.w3) {
				aw(a)
			}
		},
		createCSS : function(b, a, c, d) {
			if (ah.w3) {
				az(b, a, c, d)
			}
		},
		addDomLoadEvent : aj,
		addLoadEvent : aC,
		getQueryParamValue : function(b) {
			var a = aL.location.search || aL.location.hash;
			if (a) {
				if (/\?/.test(a)) {
					a = a.split("?")[1]
				}
				if (b == null) {
					return ai(a)
				}
				var c = a.split("&");
				for ( var d = 0; d < c.length; d++) {
					if (c[d].substring(0, c[d].indexOf("=")) == b) {
						return ai(c[d].substring((c[d].indexOf("=") + 1)))
					}
				}
			}
			return ""
		},
		expressInstallCallback : function() {
			if (aU) {
				var a = aS(ac);
				if (a && aJ) {
					a.parentNode.replaceChild(aJ, a);
					if (ad) {
						ay(ad, true);
						if (ah.ie && ah.win) {
							aJ.style.display = "block"
						}
					}
					if (ap) {
						ap(at)
					}
				}
				aU = false
			}
		}
	}
}();
function flashCheck() {
	var hasFlash = 0;
	var flashVersion = 0;
	var isIE =
	/* @cc_on!@ */
	0;
	if (isIE) {
		var swf = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
		if (swf) {
			hasFlash = 1;
			VSwf = swf.GetVariable("$version");
			flashVersion = parseInt(VSwf.split(" ")[1].split(",")[0])
		}
	} else {
		if (navigator.plugins && navigator.plugins.length > 0) {
			var swf = navigator.plugins["Shockwave Flash"];
			if (swf) {
				hasFlash = 1;
				var words = swf.description.split(" ");
				for ( var i = 0; i < words.length; ++i) {
					if (isNaN(parseInt(words[i]))) {
						continue
					}
					flashVersion = parseInt(words[i])
				}
			}
		}
	}
	return {
		f : hasFlash,
		v : flashVersion
	}
}
function IsElement(a) {
	return document.getElementById(a) != null ? true : false
}
function getObj(a) {
	return document.getElementById(a)
}
function P7_colH2() {
	var b, k, d = 0, g, c, l, a = document.p7eqc, f = document.p7eqa;
	if (a && a.length) {
		for (b = 1; b < a.length; b += 2) {
			a[b + 1].style.paddingBottom = ""
		}
		for (b = 1; b < a.length; b += 2) {
			k = a[b].offsetHeight;
			d = (k > d) ? k : d
		}
		for (b = 1; b < a.length; b += 2) {
			k = a[b].offsetHeight;
			if (k < d) {
				l = d - k;
				if (!f && a[0] == 1) {
					P7_eqA2(a[b + 1].id, 0, l)
				} else {
					a[b + 1].style.paddingBottom = l + "px"
				}
			}
		}
		document.p7eqa = 1;
		document.p7eqth = document.body.offsetHeight;
		document.p7eqtw = document.body.offsetWidth
	}
}
function P7_eqT2() {
	if (document.p7eqth != document.body.offsetHeight
			|| document.p7eqtw != document.body.offsetWidth) {
		P7_colH2()
	}
}
function P7_equalCols2() {
	var d, b, a;
	if (document.getElementById) {
		document.p7eqc = new Array();
		document.p7eqc[0] = arguments[0];
		for (i = 1; i < arguments.length; i += 2) {
			a = null;
			d = document.getElementById(arguments[i]);
			if (d) {
				b = d.getElementsByTagName(arguments[i + 1]);
				if (b) {
					a = b[b.length - 1];
					if (!a.id) {
						a.id = "p7eq" + i
					}
				}
			}
			if (d && a) {
				document.p7eqc[document.p7eqc.length] = d;
				document.p7eqc[document.p7eqc.length] = a
			}
		}
		setInterval("P7_eqT2()", 10)
	}
}
function P7_eqA2(a, h, f) {
	var c = 10, d = 20, b = document.getElementById(a);
	np = (h >= f) ? f : h;
	b.style.paddingBottom = np + "px";
	if (np < f) {
		np += d;
		setTimeout("P7_eqA2('" + a + "'," + np + "," + f + ")", c)
	}
}
var clear_search_default_keyword = {
	option_timeout : null,
	get_obj : function(a) {
		if (!a) {
			return null
		} else {
			if (typeof a == "string") {
				return getObj(a)
			} else {
				if (typeof a == "object") {
					return a
				}
			}
		}
	},
	clean_default : function(a, b, c) {
		if (b == c) {
			this.get_obj(a).value = ""
		}
	},
	set_default : function(a, b, c) {
		if (b == "") {
			this.get_obj(a).value = c
		}
	}
};
function createAdv(b, a, m, c, d, o, f) {
	var n;
	var k = new Array("swf", "html", "code", "img");
	var l = "<img src='' data-original='" + a + "' width='" + d + "' height='"
			+ o + "' alt='" + c + "' class='lazy'/>";
	if (!f) {
		l = "<img src='" + a + "' width='" + d + "' height='" + o + "' alt='"
				+ c + "'/>"
	}
	if (k[0] == m.toLowerCase()) {
		var g = {
			menu : "false",
			isAutoPlay : "true"
		};
		var h = {
			wmode : "opaque"
		};
		n = '<span class="show_swf"><div id="swf_adv'
				+ c
				+ '"><p><a href="http://get.adobe.com/cn/flashplayer"><span>点击获取最新版Flash Player</span></a></p></div></span>';
		document.write(n);
		swfobject.embedSWF(a, "swf_adv" + c, d, o, "9.0.0", {}, g, h)
	} else {
		if (k[1] == m.toLowerCase()) {
			n = '<iframe scrolling="no" height="' + o
					+ '" frameborder="0" width="' + d
					+ '" border="0" allowtransparency="true" src="' + a
					+ '" id="' + c + '_ic_feeds_expand_iframe"></iframe>';
			document.write(n)
		} else {
			if (k[2] == m.toLowerCase()) {
				n = "<a href='" + b + "' target='_blank'>" + l + "</a>";
				document.write(n)
			} else {
				n = "<a href='" + b + "' target='_blank'>" + l + "</a>";
				document.write(n)
			}
		}
	}
}
function Pid(b, a) {
	if (!a) {
		return document.getElementById(b)
	} else {
		return (document.getElementById(b)).getElementsByTagName(a)
	}
}
function pp_tab(b, g, d, c, n, a) {
	var m = Pid(b, g);
	var k = Pid(b, d);
	if (!c) {
		l = k
	} else {
		var l = [];
		for (i = 0; i < k.length; i++) {
			if (k[i].className.match(/\btab_content\b/)) {
				l.push(k[i])
			}
		}
	}
	if (!a) {
		f(0);
		h()
	} else {
		f(a);
		h()
	}
	function h() {
		for ( var o = 0; o < m.length; o++) {
			m[o].temp = o;
			if (!n) {
				n = "onmouseover";
				m[o][n] = function() {
					f(this.temp)
				}
			} else {
				m[o][n] = function() {
					f(this.temp)
				}
			}
		}
	}
	function f(p) {
		for ( var o = 0; o < m.length; o++) {
			if (!m[o].tmpClass) {
				m[o].tmpClass = m[o].className += " ";
				l[o].tmpClass = l[o].className += " "
			}
			if (p == o) {
				m[o].className += " up";
				l[o].className += " up"
			} else {
				m[o].className = m[o].tmpClass;
				l[o].className = l[o].tmpClass
			}
		}
	}
}
$.cookie = function(b, l, o) {
	if (typeof l != "undefined") {
		o = o || {};
		if (l === null) {
			l = "";
			o.expires = -1
		}
		var f = "";
		if (o.expires
				&& (typeof o.expires == "number" || o.expires.toUTCString)) {
			var g;
			if (typeof o.expires == "number") {
				g = new Date();
				g.setTime(g.getTime() + (o.expires * 24 * 60 * 60 * 1000))
			} else {
				g = o.expires
			}
			f = "; expires=" + g.toUTCString()
		}
		var n = o.path ? "; path=" + o.path : "";
		var h = o.domain ? "; domain=" + o.domain : "";
		var a = o.secure ? "; secure" : "";
		document.cookie = [ b, "=", encodeURIComponent(l), f, n, h, a ]
				.join("")
	} else {
		var d = null;
		if (document.cookie && document.cookie != "") {
			var m = document.cookie.split(";");
			for ( var k = 0; k < m.length; k++) {
				var c = jQuery.trim(m[k]);
				if (c.substring(0, b.length + 1) == (b + "=")) {
					d = decodeURIComponent(c.substring(b.length + 1));
					break
				}
			}
		}
		return d
	}
};
(function(a) {
	a.fn.reverseOrder = function() {
		return this.each(function() {
			a(this).prependTo(a(this).parent())
		})
	}
})(jQuery);
function newFilm() {
	var a = $("#tab_content_newfilm");
	ajax_post("/index/newfilm", "", function(b) {
		a.html(b)
	})
}
function postDigg(c, d) {
	var b = $("#newdigg");
	var h = jQuery.cookie("film_digg");
	if (h != null) {
		var a = h.split(",");
		var g = false;
		h = "";
		j = 1;
		for (i = a.length - 1; i >= 0; i--) {
			if (a[i] == d && g) {
				continue
			} else {
				if (a[i] == d && !g) {
					g = true
				}
				h += (h == "" ? a[i] : "," + a[i]);
				j++;
				if (j == 20 && g) {
					break
				}
				if (j == 19 && !g) {
					break
				}
			}
		}
		if (g) {
			alert("重复投票！");
			return
		} else {
			h += "," + d
		}
		jQuery.cookie("film_digg", h, {
			expires : 1,
			path : ""
		})
	} else {
		jQuery.cookie("film_digg", d, {
			expires : 1,
			path : ""
		})
	}
	var f = "/filmdigg/getDigg?film=" + d + "&action=" + c;
	ajax_post(f, "", function(k) {
		b.html(k)
	})
}
function getDigg(b) {
	var a = $("#newdigg");
	var c = "/filmdigg/getDigg?film=" + b;
	ajax_post(c, "", function(d) {
		a.html(d)
	})
}
function updateFilmListHits(a) {
	ajax_post("/film/updateFilmListHits?filmListId=" + a, "", function() {
	})
}
function updateFilmHits(a) {
	ajax_post("/film/updateFilmHits?filmId=" + a, "", function() {
	})
}
function selected_film(f, c, d) {
	var a = $("#film_li_sort_" + f);
	for (i = 1; i <= c; i++) {
		var b = $("#film_li_sort_" + i);
		b.removeAttr("class")
	}
	a.addClass(d)
}
function rvs(f, d) {
	var c = "";
	var a = "";
	if (d > 1 && f.length >= d) {
		a = f.substring(d);
		for ( var b = a.length - 1; b >= 0; b--) {
			c += a.substring(b, b + 1)
		}
		f = f.substring(0, d) + c
	}
	return f
}
function rvs_(b) {
	var c = jQuery.cookie("Hm_lt_640e8b7496ca5e87eb42eaddcd6e82ba");
	var a = c.substring(c.length - 1);
	return rvs(b, a)
}
var flashtips = '<p style="text-align:center;color:#000;padding-top:130px;line-height:2;font-size: 16px;">您没有安装FlashPlayer <a style="color:#f00;" href="http://get.adobe.com/kr/flashplayer/" target="_blank">请点击此处去下载安装最新的FlashPlayer</a><br>安装完毕之后请刷新页面或者重新启动浏览器。</p>';
function my_yk(d, h) {
	var c = "/player/playurl";
	var f = $('input:radio[name="yk_player"]:checked');
	var b = f.val();
	var a = $("#playerContentDiv");
	a.addClass("playerloading");
	var m = $(d).attr("data-index");
	var k = parseInt(m) - 1;
	var l = $(d).attr("data-count");
	var g = $(d).attr("data-id");
	$("#mod_player").css("borderColor", "#3e99d4").css("backgroundColor",
			"#caeaff");
	ajax_post(c, "film=" + film_id + "&film_=" + k + "&type=" + h
			+ "&film_code=" + film_name_, function(t) {
		var u = t.indexOf("/sid/") + 5;
		var p = t.indexOf("/v.swf");
		var q = '<div id="movie_player">' + flashtips + "</div>";
		a.html(q);
		var o = t.substring(u, p);
		if (u == 39) {
			t = "http://player.youku.com/player.php/partnerid/XMTI=/sid/"
					+ rvs_(o) + "/v.swf"
		}
		var r = t;
		var n = {
			menu : "false",
			winType : "BDskin",
			isShowRelatedVideo : "false",
			partnerid : "XMTI=",
			p : "1",
			isAutoPlay : "true"
		};
		var s = {
			menu : "false",
			wmode : "opaque",
			allowfullscreen : "true",
			name : "movie_player"
		};
		switch (b) {
		case "0":
			r = "/userfiles/media/tools/ykplayer-2.swf";
			if (u == 39) {
				n = {
					VideoIDS : rvs_(o),
					winType : "BDskin",
					isShowRelatedVideo : "false",
					partnerid : "XMTI=",
					show_ce : 0,
					showsearch : 0,
					p : "1",
					menu : "false",
					isAutoPlay : "true"
				}
			} else {
				r = t
			}
			break;
		case "1":
			r = "http://static.youku.com/v/swf/qplayer_taobao.swf";
			if (u == 39) {
				n = {
					VideoIDS : rvs_(o),
					winType : "BDskin",
					isShowRelatedVideo : "false",
					partnerid : "XMTI=",
					p : "1",
					menu : "false",
					isAutoPlay : "true"
				}
			} else {
				r = t
			}
			break
		}
		swfobject.embedSWF(r, "movie_player", "100%", "100%", "7",
				"/expressInstall.swf", n, s);
		selected_film(m, l, "green_title");
		if (g) {
			updateFilmListHits(g)
		}
	})
}
function my_td(d, f) {
	var c = "/player/playurl";
	var g = $('input:radio[name="td_player"]:checked');
	var m = $(d).attr("data-index");
	var k = parseInt(m) - 1;
	var l = $(d).attr("data-count");
	var h = $(d).attr("data-id");
	var b = g.val();
	var a = $("#playerContentDiv");
	a.addClass("playerloading");
	$("#mod_player").css("borderColor", "#212121").css("backgroundColor",
			"#212121");
	ajax_post(
			c,
			"film=" + film_id + "&film_=" + k + "&type=" + f + "&film_code="
					+ film_name_,
			function(s) {
				var o = "http://js.tudouui.com/bin/lingtong/PortalPlayer_75.swf";
				var q = '<div id="insertplayer">' + flashtips + "</div>";
				a.html(q);
				var n = {
					menu : "false",
					autoPlay : "true"
				};
				var r = {
					quality : "high",
					wmode : "opaque",
					allowfullscreen : "true"
				};
				if (s.indexOf("http://") == 0) {
					o = s
				} else {
					var p = "iid="
							+ rvs_(s)
							+ "&default_skin=0&hd=2&isRec=1&ports=100:0&statratio=1000&safekey=IAlsoNeverKnow&theme=black&cs=350&ct=180&ca=0&cb=0.1&ctime=&cp=20&nc=0&actionID=1&ID=&adOwnerId=0&adPositionId=0&isNielson=0&isRenhe=0&vurl=&phd=-1&aid=&csc6=0&nls=0&np=0&nm=0&scale=1";
					switch (b) {
					case "0":
						o = "http://js.tudouui.com/bin/lingtong/PortalPlayer_75.swf";
						p = "listType=1&iid="
								+ rvs_(s)
								+ "&listCode=hQtzrByo_m0&icode=u9KaJdz0sSA&hd=2&ol=1&phd=2&shareBtn=0&topBarFull=0&topBarNor=0&likeBtn=0&sogouBtn=0";
						break;
					case "1":
						o = "/userfiles/media/tools/player.swf";
						break;
					case "2":
						o = "http://js.tudouui.com/bin/player2/olc_8.swf?swfPath=http://js.tudouui.com/bin/player2/olm_34.swf";
						break
					}
					r = {
						quality : "high",
						wmode : "opaque",
						allowfullscreen : "true",
						allowscriptaccess : "always",
						src : o,
						name : "insertplayer",
						flashvars : p
					}
				}
				swfobject.embedSWF(o, "insertplayer", "100%", "100%", "7",
						"/expressInstall.swf", n, r);
				selected_film(m, l, "orange_title");
				if (h) {
					updateFilmListHits(h)
				}
			})
}
function my_else(g, d) {
	var a = "/player/playurl";
	var k = $("#playerContentDiv");
	k.addClass("playerloading");
	var c = $(g).attr("data-index");
	var h = parseInt(c) - 1;
	var f = $(g).attr("data-count");
	var b = $(g).attr("data-id");
	$("#mod_player").css("borderColor", "#3e99d4").css("backgroundColor",
			"#caeaff");
	ajax_post(
			a,
			"film=" + film_id + "&film_=" + h + "&type=" + d + "&film_code="
					+ film_name_,
			function(o) {
				if (o.indexOf("qvod://") == 0) {
					k
							.html('<iframe id="iframe_down" name="iframe_down" scrolling="no" frameborder="0" style="margin: 0;width: 600px; height: 420px; display: none;" src=""></iframe><object width="100%" height="100%" type="application/x-shockwave-flash" classid="clsid:F3D0D36F-23F8-4682-A195-74C92B03D4AF" id="insertplayer" name="insertplayer" onerror="document.getElementById(\'insertplayer\').style.display=\'none\';document.getElementById(\'iframe_down\').style.display=\'\';document.getElementById(\'iframe_down\').src=\'http://m.koreayh.com/qvodInstall.html\';" style="visibility: visible;"><param name="wmode" value="opaque"><param name="allowfullscreen" value="true"><param value="1" name="AutoPlay"><param name="URL" value="'
									+ o
									+ '"><param name="QvodAdUrl" value="http://m.koreayh.com/qvodloading.html"><param name="QvodPauseAdUrl" value="http://m.koreayh.com/qvodpause.html"><embed id="insertplayer2" name="insertplayer2" width="100%" height="100%" URL="'
									+ o
									+ '" type="application/qvod-plugin" Autoplay="1" QvodAdUrl="http://m.koreayh.com/qvodloading.html" QvodPauseAdUrl="http://m.koreayh.com/qvodpause.html"></embed></object>')
				} else {
					if (o.indexOf(".htm") > 0) {
						k
								.html('<iframe scrolling="no" frameborder="0" style="margin: 0;width: 600px; height: 420px; border:none" src="'
										+ o + '"></iframe>')
					} else {
						if (o.indexOf("http://v.koreayh.com:9080") > 0) {
							o = "http://v.koreayh.com:9080/live/player/ckplayer.swf?f="
									+ o
						}
						if (d == "sohu") {
							o = o.replace("autoplay=false", "autoplay=true")
									.replace(/[\&]xuid=([^\&]+)/g, "&")
									.replace(/[\&]api_key=([^\&]+)/g, "&")
									+ "&xuid=e34076140&api_key=6444c86bb958018dc8d4027665fa1dd2"
						}
						var m = '<div id="insertplayer">' + flashtips
								+ "</div>";
						k.html(m);
						var l = {
							menu : "false",
							isAutoPlay : "true",
							auto_play : "1",
							loop : "-1",
							show_ce : "0",
							xuid : "e34076140",
							api_key : "6444c86bb958018dc8d4027665fa1dd2",
							isShowRelatedVideo : "false",
							withSearchBar : "false"
						};
						var n = {
							wmode : "opaque",
							allowfullscreen : "true"
						};
						swfobject.embedSWF(o, "insertplayer", "100%", "100%",
								"7", "/expressInstall.swf", l, n)
					}
				}
				selected_film(c, f, "green_title");
				if (b) {
					updateFilmListHits(b)
				}
			})
}
$(function() {
	P7_equalCols2(1, "sidebar", "P", "maincontent", "P");
	$("#gotoTop").click(function() {
		$("html, body").animate({
			scrollTop : 0
		}, 120)
	});
	backToTopFun = function() {
		var f = $(document).scrollTop(), g = $(window).height();
		(f > 0) ? $("#gotoTop").show() : $("#gotoTop").hide();
		if (TestIE.IE6) {
			$("#gotoTop").css("top", f + g - 166)
		}
		$("#gotoTop").css("right",
				(document.documentElement.clientWidth - 980) / 2 - 55 + "px")
	};
	backToTopFun();
	window.onresize = backToTopFun;
	window.onscroll = backToTopFun;
	$("img.lazy").lazyload({
		effect : "fadeIn"
	});
	$(".left_adv img.lazy").lazyload({
		effect : "fadeIn"
	});
	$("#asc_desc").live("click", function() {
		$("#sort_video_list li").reverseOrder()
	});
	$("#return_my_vlist").live("click", function() {
		pp_tab("tab_playerbar", "h3", "div", "tab_content", "onclick", 1)
	});
	$("#tab_h3_newfilm").live(
			"click",
			function() {
				var f = "/index/fetch_newfilm?dl_last_id=" + dl_last_id
						+ "&hp_last_id=" + hp_last_id + "&ms_last_id="
						+ ms_last_id + "&yh_last_id=" + yh_last_id;
				ajax_post(f, "", function(g) {
					if (g == "1") {
						newFilm()
					}
				})
			});
	film_name_ = jQuery.cookie("Hm_lpt_640e8b7496ca5e87eb42eaddcd6e82ba");
	$(".pselecting input").live("change", function() {
		var f = $(this).attr("name");
		if (f == "yk_player") {
			$("ul#sort_video_list li a.youku").first().click()
		} else {
			$("ul#sort_video_list li a.tudou").first().click()
		}
		$("#my_select_player").attr("checked", false)
	});
	$("#my_select_player").live("change", function() {
		var g = $('input:radio[name="yk_player"]:checked').val();
		var f = $('input:radio[name="td_player"]:checked').val();
		var k = $(this).attr("checked");
		if (k) {
			var h = g + "," + f;
			jQuery.cookie("myplayer", h, {
				expires : 365,
				path : ""
			})
		} else {
			jQuery.cookie("myplayer", null)
		}
	});
	var d = jQuery.cookie("myplayer");
	var a = null;
	var c = null;
	if (d != null) {
		var b = d.split(",");
		if (b.length == 2) {
			a = b[0];
			c = b[1]
		}
	}
	$("ul#sort_video_list li").live({
		mouseenter : function() {
			$(this).css("background-color", "#EAEAEA");
			$(this).find(".view_img").addClass("showalltvicon")
		},
		mouseleave : function() {
			$(this).css("background-color", "transparent");
			$(this).find(".view_img").removeClass("showalltvicon")
		}
	});
	$("ul#sort_video_list li a").live("click", function() {
		var f = $.trim($(this).attr("class"));
		if (f) {
			switch (f) {
			case "youku":
				my_yk($(this), f);
				break;
			case "tudou":
				my_td($(this), f);
				break;
			default:
				my_else($(this), f);
				break
			}
		}
	});
	if (a) {
		$("input:radio[name=yk_player][value=" + a + "]").attr("checked", true)
	}
	if (c) {
		$("input:radio[name=td_player][value=" + c + "]").attr("checked", true)
	}
	if (a && c) {
		$("#my_select_player").attr("checked", true)
	}
});